package o;

import android.graphics.Rect;
import android.view.View;
import androidx.annotation.IdRes;

public class djs {
    final int ˊ;
    final int ˎ;
    final int ˏ;

    public static class c {
        final int ˊ;
        final int ˋ;
        int ˎ;
        final int ˏ;

        private c(int i, int i2, int i3) {
            this.ˎ = 0;
            this.ˊ = i;
            this.ˋ = i2;
            this.ˏ = i3;
        }

        public Rect ˎ() {
            this.ˎ++;
            Rect rect = new Rect(0, -1, 0, -1);
            if (this.ˎ == 1) {
                rect.left = this.ˋ;
            } else {
                rect.left = this.ˏ;
            }
            if (this.ˎ == this.ˊ) {
                rect.right = this.ˋ;
            } else if (this.ˎ < this.ˊ) {
                rect.right = this.ˏ;
            }
            return this.ˎ > this.ˊ ? null : rect;
        }
    }

    public djs(int i, int i2, int i3) {
        this.ˊ = i;
        this.ˎ = i2;
        this.ˏ = i3;
    }

    public void ˏ(View view, Rect rect) {
        if (view != null && rect != null) {
            int i = rect.top;
            if (i == -1) {
                rect.top = view.getPaddingTop();
            }
            int i2 = rect.bottom;
            if (i2 == -1) {
                i2 = view.getPaddingBottom();
            }
            view.setPadding(rect.left, i, rect.right, i2);
        }
    }

    public void ˋ(View view, @IdRes int i, Rect rect) {
        if (view != null && rect != null) {
            ˏ(view.findViewById(i), rect);
        }
    }

    public c ˊ() {
        return new c(this.ˊ, this.ˎ, this.ˏ);
    }
}
